package com.mt.mtbusinessmanagementsystem.utils;
import io.jsonwebtoken.Claims;
import org.springframework.stereotype.Component;

@Component
public class CurrentUserHolder {

    private static final ThreadLocal<Claims> currentClaims = new ThreadLocal<>();

    public static void setClaims(Claims claims) {
        currentClaims.set(claims);
    }

    public static Claims getClaims() {
        return currentClaims.get();
    }

    public static void removeClaims() {
        currentClaims.remove();
    }
}